package com.xncoding.email.web;

import java.util.UUID;

import com.xncoding.email.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mail")
public class MailRest {
	@Autowired
	MailService mailService;
	
	@RequestMapping(value = "/{to}", method = { RequestMethod.GET })
	public String mail(@PathVariable("to") String to) {
		String content = "直接登录网页  看发邮件吗，不能发的话 asdasd";
		mailService.sendSimpleMail(to, content, content, true);
		return "hello,world";
	}
	
}
